import pause from './pause';
import implicitLocators from './implicit-locators';
import scriptInterpolation from './script-interpolation';
import waitForCommands from './wait-for-commands';
import variableName from './variable-name';
import selectWindow from './select-window';

export const migrators = {
    pause,
    implicitLocators,
    scriptInterpolation,
    waitForCommands,
    variableName,
    selectWindow,
};

export default Object.keys(migrators).reduce((migs, migName) => {
    const mig = migrators[migName];
    if (!migs[mig.version]) {
        migs[mig.version] = {};
    }
    migs[mig.version][migName] = mig;

    return migs;
}, {});
